INCLUDES = $(shell xmlrpc-c-config client --cflags)

LIBS = $(shell xmlrpc-c-config client --libs)

project: server 5server newxmlrpc asyncclient syncclient

asyncclient: asyncclientsingle asyncclientmajority asyncclientall

syncclient: syncclientsingle syncclientmajority syncclientall

asyncclientsingle: asyncclientsingle.o
	cc -g -o asyncclientsingle $(LIBS) asyncclientsingle.o

asyncclientsingle.o: asyncclientsingle.c
	cc -g -c $(INCLUDES) asyncclientsingle.c

asyncclientmajority: asyncclientmajority.o
	cc -g -o asyncclientmajority $(LIBS) asyncclientmajority.o

asyncclientmajority.o: asyncclientmajority.c
	cc -g -c $(INCLUDES) asyncclientmajority.c

asyncclientall: asyncclientall.o
	cc -g -o asyncclientall $(LIBS) asyncclientall.o

asyncclientall.o: asyncclientall.c
	cc -g -c $(INCLUDES) asyncclientall.c

asyncclientsingle: syncclientsingle.o
	cc -g -o syncclientsingle $(LIBS) syncclientsingle.o

asyncclientsingle.o: syncclientsingle.c
	cc -g -c $(INCLUDES) syncclientsingle.c

syncclientmajority: syncclientmajority.o
	cc -g -o syncclientmajority $(LIBS) syncclientmajority.o

syncclientmajority.o: syncclientmajority.c
	cc -g -c $(INCLUDES) syncclientmajority.c

syncclientall: syncclientall.o
	cc -g -o syncclientall $(LIBS) syncclientall.o

syncclientall.o: syncclientall.c
	cc -g -c $(INCLUDES) syncclientall.c

newxmlrpc: 
	cd xmlrpc-c/;./configure;make;make install;


server:
	cd Server;make;

5server:
	bash go.sh 5

clean:
	rm *.o asyncclientmajority asyncclientall asyncclientsingle syncclientmajority syncclientall syncclientsingle
